Skip to content

Conversation

@bbasata
Copy link
Collaborator

@bbasata bbasata commented Feb 28, 2025

Follow-up to #7 for parity with zclconf/go-cty v1.4.2.

On further thought, I'm liking "Unreleased" and no release tag for the moment. This prevents a flood of Dependabot PRs like hashicorp/terraform-plugin-testing#444 for all affected providers.

Update method:

# Set up local Git repository

$ git clone [email protected]:hashicorp/go-cty.git hashicorp-go-cty
$ cd hashicorp-go-cty
$ git remote add upstream [email protected]:zclconf/go-cty.git --no-tags

$ git remote -v
origin	[email protected]:hashicorp/go-cty.git (fetch)
origin	[email protected]:hashicorp/go-cty.git (push)
upstream	[email protected]:zclconf/go-cty.git (fetch)
upstream	[email protected]:zclconf/go-cty.git (push)

# Find commit refs for the current version and the next version

$ git ls-remote upstream refs/tags/v1.4.1^{}
c1fac28a50c9c3cdbbad888b289e2928a790015b	refs/tags/v1.4.1^{}

$ git ls-remote upstream refs/tags/v1.4.2^{}
e4e179713c4787a2b3837353fde2c1fe38bebe22	refs/tags/v1.4.2^{}

# Apply the commits to a new branch

$ git log --oneline c1fac28a50c9c3cdbbad888b289e2928a790015b..e4e179713c4787a2b3837353fde2c1fe38bebe22
e4e1797 v1.4.2 release
dd574de Update CHANGELOG.md
e76fe06 function/stdlib: jsonencode should produce a string representation of null
6e20bc2 Prepare CHANGELOG for a forthcoming 1.4.2 release

$ git log --oneline --format=%h --reverse c1fac28a50c9c3cdbbad888b289e2928a790015b..e4e179713c4787a2b3837353fde2c1fe38bebe22
6e20bc2
e76fe06
dd574de
e4e1797

$ git checkout -b forward-to-1.4.2
$ git cherry-pick $(git log --oneline --format=%h --reverse c1fac28a50c9c3cdbbad888b289e2928a790015b..e4e179713c4787a2b3837353fde2c1fe38bebe22) # and resolve conflicts in CHANGELOG.md

$ # Update CHANGELOG.md

# Verify

## Check module name in Go files
$ ag zclconf -G '.go$'

## Inspect diff
$ git diff -U0 e4e179713c4787a2b3837353fde2c1fe38bebe22..HEAD

## Inspect simpler diff
git diff -U0 --ignore-matching-lines 'github.com/(hashicorp|zclconf)/go-cty' e4e179713c4787a2b3837353fde2c1fe38bebe22..HEAD -- . ':(exclude).github/CODEOWNERS'

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3767291..ac175df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1 +1 @@
-# 1.4.2 (May 29, 2020)
+# 1.4.2 (Unreleased)
@@ -5 +6 @@
-# 1.4.1 (May 18, 2020)
+# 1.4.1 (March 5, 2025)
diff --git a/cty/function/stdlib/string.go b/cty/function/stdlib/string.go
index 01ebc47..60e0ab5 100644
--- a/cty/function/stdlib/string.go
+++ b/cty/function/stdlib/string.go
@@ -154 +153,0 @@ var SubstrFunc = function.New(&function.Spec{
-

@bbasata bbasata force-pushed the forward-to-1.4.1 branch 4 times, most recently from bd65027 to eca1c75 Compare March 5, 2025 21:31
Base automatically changed from forward-to-1.4.1 to master March 5, 2025 21:36
@bbasata bbasata force-pushed the forward-to-1.4.2 branch 2 times, most recently from 0937293 to 4681aad Compare March 5, 2025 22:31
@bbasata bbasata force-pushed the forward-to-1.4.2 branch from 9d14bc9 to 79dc5e9 Compare March 6, 2025 14:42
@bbasata bbasata marked this pull request as ready for review March 6, 2025 15:04
@bbasata bbasata requested a review from a team as a code owner March 6, 2025 15:04
@bbasata
Copy link
Collaborator Author

bbasata commented Mar 6, 2025

Update method:

Also:

$ go1.12 test ./...

ok  	github.com/hashicorp/go-cty/cty	1.085s
ok  	github.com/hashicorp/go-cty/cty/convert	1.291s
ok  	github.com/hashicorp/go-cty/cty/function	0.966s
ok  	github.com/hashicorp/go-cty/cty/function/stdlib	1.239s
ok  	github.com/hashicorp/go-cty/cty/gocty	1.158s
ok  	github.com/hashicorp/go-cty/cty/json	0.964s
ok  	github.com/hashicorp/go-cty/cty/msgpack	0.815s
ok  	github.com/hashicorp/go-cty/cty/set	(cached)

@bbasata bbasata merged commit b56e5cf into master Mar 6, 2025
1 check passed
@bbasata bbasata deleted the forward-to-1.4.2 branch March 6, 2025 17:42
@bbasata bbasata mentioned this pull request Mar 6, 2025
bbasata added a commit to hashicorp/terraform-plugin-sdk that referenced this pull request Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants